﻿<?xml version="1.0" encoding="utf-8"?>
<hibernate-configuration  xmlns="urn:nhibernate-configuration-2.2" >
	<session-factory name="NHibernate.create">
    <!-- Settings for a local SQLite (testing) database. -->
    <property name="connection.driver_class">NHibernate.Driver.SQLite20Driver</property>
    <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
		<property name="connection.connection_string">Data Source=ngilead.db;</property>
    <property name="dialect">NHibernate.Dialect.SQLiteDialect</property>

    <!-- Settings for a local SQLServer (testing) database. -->
    <!--
    <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
    <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
    <property name="connection.connection_string">Server=[HOST]\SQLEXPRESS;initial catalog=[CATALOG];User Id=[USER];Password=[PASSWORD];</property>
    <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
    -->
    
    <!-- Print SQL to stdout. -->
    <property name="show_sql">true</property>
    
    <property name="connection.release_mode">on_close</property>

    <!-- Bind the getCurrentSession() method to the thread. -->
    <property name="current_session_context_class">thread_static</property>

    <property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>

    <!-- Hibernate XML mapping files -->
    <mapping resource="Ngilead.Test.Resources.Stateless.Nhibernate.country.hbm.xml" assembly="Ngilead.Test.Resources" />
    <mapping resource="Ngilead.Test.Resources.Stateless.Nhibernate.gender.hbm.xml" assembly="Ngilead.Test.Resources" />
    <mapping resource="Ngilead.Test.Resources.Stateless.Nhibernate.group.hbm.xml" assembly="Ngilead.Test.Resources" />
    <mapping resource="Ngilead.Test.Resources.Stateless.Nhibernate.message.hbm.xml" assembly="Ngilead.Test.Resources" />
    <mapping resource="Ngilead.Test.Resources.Stateless.Nhibernate.user.hbm.xml" assembly="Ngilead.Test.Resources" />
  </session-factory>
</hibernate-configuration>